﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserList.aspx.cs" Inherits="Manage_WebPages_UserInfo_UserList" %>
<%@ Import Namespace="QuickORM.Common" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户列表</title>
    <script src="../../js/jquery.js" type="text/javascript"></script>
    <script src="../../js/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <link href="../../js/bootstrap/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="../../js/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <script src="../../js/Common.js" type="text/javascript"></script>
    <script type="text/javascript">
        function select() {
            $('#btnSelect').click();
        };
    </script>
</head>
<body>
<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div>
                <div style="border: 1px solid cornflowerblue; height: 50px; margin: 1px 1px;">
                    <div class="form-inline" style="margin-left: 20px; margin-top: 10px;">
                        <label class="control-label" for="txtUserName">用户名:</label>
                        <input type="text" class="input-small" placeholder="" runat="server" id="txtUserName"/>
                        <button type="button" class="btn btn-primary" runat="server" id="btnSelect" OnServerClick="btnSelect_Click">检索</button>
                        <button type="button" class="btn" onclick="openDialogResize('UserManager.aspx', '600', '500');">新增</button>
                    </div>
                </div>
                <br/>
                <table class="table table-hover table-bordered table-striped">
                    <thead>
                    <tr>
                        <th>用户名</th>
                        <th >真实姓名</th>
                        <th >邮箱</th>
                        <th >手机</th>
                        <th >部门</th>
                        <th >角色</th>
                        <th align="center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <asp:Repeater ID="rptList" runat="server">
                        <ItemTemplate>
                            <tr>

                                <td><%#Eval("UserName").ToString() %></td>
                                <td><%#Eval("RealName").ToString() %></td>
                                <td><%#Eval("Email").ToString() %></td>
                                <td><%#Eval("Tel").ToString() %></td>
                                <td><%#Eval("Dep").ToString() %></td>
                                <td><%#Util.GetRoleName(Eval("RoleID").ToString()) %></td>
                                <td align="center">
                                    <a href="#" onclick="openDialogResize('<%#"UserManager.aspx?action=edit&id=" + Eval("UserID").ToString() %>', '600', '500');">修改</a> |
                                    <asp:LinkButton ID="linkBtnDel" runat="server" CommandName="del" CssClass="link03" CommandArgument='<%# Eval("UserID") %>' Text="删除" OnClick="linkBtnDel_Click" OnClientClick="return confirm('确定要删除吗?');"/>
                                    <asp:LinkButton ID="LinkButPwd" runat="server" CommandName="pwd" CssClass="link03" CommandArgument='<%# Eval("UserID") %>' Text="重置密码" OnClick="linkBtnPwd_Click" OnClientClick="return confirm('确定要重置密码吗?');"/>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    </tbody>
                </table>
                <div class="pagin fr">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="10"
                                          FirstPageText="首页" LastPageText="尾页" NextPageText="后页" PrevPageText="前页"
                                          NumericButtonCount="9" onpagechanged="AspNetPager1_PageChanged" ShowPageIndexBox="Never">
                        >
                    </webdiyer:AspNetPager>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</form>
</body>
</html>